local lsp_chongqi = fk.CreateSkill {
    name = "lsp_chongqi",
    tags = { Skill.Compulsory }
}

Fk:loadTranslationTable {
    ["lsp_chongqi"] = "充气",
    [":lsp_chongqi"] = "出牌阶段限一次，你可以将任意张“钢板”牌交给一名其他角色，若你因此交出了所有手牌，或交出牌中有【桃】或【酒】，你增加一点护甲，令下次发动〖钢板〗时的效果改为任意属性伤害，且摸牌量+1。",

    ["@@lsp_chongqi-inhand"] = "钢板",
}

lsp_chongqi:addEffect("active", {
    anim_type = "support",
    prompt = "#ganggeng",
    min_card_num = 1,
    target_num = 1,
    can_use = function(self, player)
        return player:usedEffectTimes(self.name, Player.HistoryPhase) == 0 and
            #table.filter(player:getCardIds("h"),
                function(i) return Fk:getCardById(i):getMark("@@lsp_gangban-inhand") > 0 end) > 0
    end,
    card_filter = function(self, player, to_select, selected)
        return Fk:getCardById(to_select):getMark("@@lsp_gangban-inhand") > 0
    end,
    target_filter = function(self, player, to_select, selected)
        return #selected == 0 and to_select ~= player
    end,
    on_use = function(self, room, effect)
        local player = effect.from
        local target = effect.tos[1]
        room:moveCardTo(effect.cards, Player.Hand, target, fk.ReasonGive, lsp_chongqi.name, nil, false, player)
        local ojbk = false
        for _, id in ipairs(effect.cards) do
            if Fk:getCardById(id).trueName == "peach" or Fk:getCardById(id).trueName == "analeptic" then
                ojbk = true
            end
        end
        if player:getHandcardNum() == 0 or ojbk == true then
            room:changeShield(player, 1)
            room:setPlayerMark(player, "lsp_chongqi", 1)
        end
    end,
})




return lsp_chongqi
